<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('【请填写功能名称】列表')" />
    <script src="../static/ruoyi/js/ry-ui.js"></script>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label style="width: 75px">监测点名称:</label>
                            <select name="monitorId" id="monitorId" >
                            </select>
                        </li>
                        <li>
                            <label>选择日期：</label>
                            <input type="text" placeholder="请选择查询时间" class="time-input" name="produceTime" id="produceTime"/>
                        </li>
                        <li>
                            <label style="width: 100px;padding-top: 7px;text-align: left;padding-left: 22px;" class="control-label">因子：</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox1" checked="checked" name="ad">氨氮</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option2" id="inlineCheckbox2" checked="checked" name="zl">总磷</label>
                            <label style="width: 120px" class="check-box">
                                <input type="checkbox" value="option3" id="inlineCheckbox3" checked="checked" name="cod">化学需氧量</label>
                            <label style="width: 90px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox4" checked="checked" name="cr">六价铬</label>
                            <label style="width: 70px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox5" checked="checked" name="ph">PH</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox6" checked="checked" name="ry">溶氧</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox7" checked="checked" name="zd">浊度</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox8" checked="checked" name="cond">电导</label>
                            <label style="width: 80px" class="check-box">
                                <input type="checkbox" value="option1" id="inlineCheckbox9" checked="checked" name="wd">温度</label>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()" ><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript" type="text/javascript">

    var editFlag = [[${@permission.hasPermi('bus:minute:edit')}]];
    var removeFlag = [[${@permission.hasPermi('bus:minute:remove')}]];
    var prefix = ctx + "bus/data";
    $(document).ready(function(){
        loadDepartmentName();
    });
    function loadDepartmentName() {
        $.ajax({
            url: "/bus/monitor/list",
            type: "post",
            success: function (data) {
                var nameOpt = "<option value='' selected='selected'>--请选择--</option>";
                for (var i = 0; i < data.rows.length; i++) {
                    nameOpt+="<option value='"+data.rows[i].monitorId+"' >"+data.rows[i].monitorName+"</option>"
                    $('#monitorId').html(nameOpt);
                    document.getElementsByTagName("tr[0]")
                }
            }

        });
    };
    $(function() {
        var options = {
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            url: prefix + "/listDay",
            columns: [
                {
                    field: 'monitorId',
                    title: 'monitorId',
                    visible: false
                },
                {
                    field: 'monitorName',
                    title: '监测点',

                },
                {
                    field: 'produceTime',
                    title: '产生时间'
                },
                {
                    field: 'ad',
                    title: '氨氮(mg/L)',
                },
                {
                    field: 'zl',
                    title: '总磷(mg/L)'
                },
                {
                    field: 'zd',
                    title: '浊度(NTU)'
                },
                {
                    field: 'wd',
                    title: '温度(℃)'
                },
                {
                    field: 'cr',
                    title: '六价铬'
                },
                {
                    field: 'yls',
                    title: '叶绿素(SPAD)'
                },
                {
                    field: 'cod',
                    title: '化学需氧量mg/L'
                },
                {
                    field: 'tn',
                    title: '总氮mg/L'
                },
                {
                    field: 'ph',
                    title: '酸碱度'
                },
                {
                    field: 'cond',
                    title: '电导S/m'
                },
                {
                    field: 'ry',
                    title: '溶氧mg/L'
                },
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>